home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / ear / fraphix1.lha / FraphiX.LHA / FraphiX / rexx / RinominaFrame.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-23  |  2KB  |  92 lines

  1. /* Questo script ARexx serve per invertire l'ordine dei fotogrammi */
  2. /* $VER1.0 */
  3.  
  4. if~show("L","rexxsupport.library") then do
  5.    if addlib('rexxsupport.library',0,-30,0) then
  6.       say "Rexxsupport.library caricata"
  7.    else do
  8.       say "Rexxsupport.library non trovata"
  9.       exit 10
  10.    end
  11. end
  12.  
  13.  
  14. LF = x2c("a")
  15. if exists("Env:FlagARexx") = 0 then do
  16.        say LF || "Invio messaggio: ATTENDI"
  17.        call delay 50
  18. end
  19. say LF || "Scansione in corso..." || LF
  20.  
  21. /* Legge i parametri passati come variabili di AmigaDOS */
  22. open('input','Env:Originale.FX',read)
  23.       originale = readln('input')
  24. close('input')
  25. open('input','Env:Finale.FX',read)
  26.       finale = readln('input')
  27. close('input')
  28.  
  29.  
  30. /* Routine di scansione dei Fotogrammi */
  31.  
  32. fotogramma=1
  33. trovato = 0
  34. non_trovato = -1
  35. file = trovato
  36.  
  37. do until (file=non_trovato)
  38.        contatore='0000' || fotogramma
  39.        nome='Fraphix_Store:Frame' || right(contatore,4)
  40.        if exists(nome) = 0 then file = non_trovato
  41.        /* say nome */
  42.        fotogramma = fotogramma + 1
  43. end
  44.  
  45. /* Routine di renumerazione dei Fotogrammi */
  46.  
  47. fotogrammi = fotogramma - 2
  48. say lf || 'Trovati ' || fotogrammi ||' fotogrammi.' ||LF
  49. open('output','Env:Fotogrammi.FX',write)
  50.       c = writeln('output',fotogrammi)
  51. close('output')
  52.  
  53. say 'Rinominazione in corso...' || lf
  54. if fotogrammi > 0 then 
  55. do contatore = 1 to fotogrammi
  56.        fotogramma = contatore
  57.        nome1 ='Fraphix_Store:' || originale || right('0000' || fotogramma,4)
  58.        nome2 ='Fraphix_Store:' || finale || right('0000' || fotogramma,4)
  59.  
  60.        com1 = 'Rename ' || nome1 || ' as ' || nome2               
  61.        address command com1
  62.  
  63.        /*
  64.          say com1
  65.          say lf
  66.          call delay 100
  67.         */
  68.  
  69. end contatore
  70. else do
  71.       say 'Non ci sono Fotogrammi!'
  72. end
  73.  
  74. if exists("Env:FlagARexx") = 0 then do
  75.        say "Invio messaggio: CONTINUA"||LF||"Attesa risposta..."
  76.        call delay 50
  77.  
  78.        address "FRAPHIX"
  79.        options results
  80.        QUIT
  81.  
  82.        if (rc=0) then
  83.              say lf||"Risposta Ricevuta."
  84.             else do
  85.              say lf||"Errore "||rc||lf||result
  86.        end
  87.      
  88.  
  89.        call delay 300
  90.  
  91. end
  92.